
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>HTML代码格式 · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="3.html内容语义.html" />
    
    
    <link rel="prev" href="1.html整体结构.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    引言
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="0.html.html">
            
                <a href="0.html.html">
            
                    
                    HTML
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="1.html整体结构.html">
            
                <a href="1.html整体结构.html">
            
                    
                    HTML整体结构
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.2.2" data-path="2.html代码格式.html">
            
                <a href="2.html代码格式.html">
            
                    
                    HTML代码格式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="3.html内容语义.html">
            
                <a href="3.html内容语义.html">
            
                    
                    HTML内容语义
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../css/0.css.html">
            
                <a href="../css/0.css.html">
            
                    
                    CSS
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../css/1.css书写规范.html">
            
                <a href="../css/1.css书写规范.html">
            
                    
                    CSS书写规范
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../css/2.css命名规范.html">
            
                <a href="../css/2.css命名规范.html">
            
                    
                    CSS命名规范
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../js/0.javascript.html">
            
                <a href="../js/0.javascript.html">
            
                    
                    JavaScript
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../js/1.javascript-es6.html">
            
                <a href="../js/1.javascript-es6.html">
            
                    
                    es6
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../图片规范/图片规范.html">
            
                <a href="../图片规范/图片规范.html">
            
                    
                    图片规范
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="../前端研发流程/前端研发流程.html">
            
                <a href="../前端研发流程/前端研发流程.html">
            
                    
                    前端研发流程
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="../项目/0.项目.html">
            
                <a href="../项目/0.项目.html">
            
                    
                    项目
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="../项目/1.食尚购.html">
            
                <a href="../项目/1.食尚购.html">
            
                    
                    食尚购App
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="../文档/0.文档.html">
            
                <a href="../文档/0.文档.html">
            
                    
                    文档
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.8.1" data-path="../文档/1.食尚购.html">
            
                <a href="../文档/1.食尚购.html">
            
                    
                    食尚购App
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.2" data-path="../文档/2.门店EDI.html">
            
                <a href="../文档/2.门店EDI.html">
            
                    
                    门店EDI
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.3" data-path="../文档/3.掌中宝.html">
            
                <a href="../文档/3.掌中宝.html">
            
                    
                    掌中宝
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.4" data-path="../文档/4.食尚购小程序.html">
            
                <a href="../文档/4.食尚购小程序.html">
            
                    
                    食尚购小程序
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >HTML代码格式</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h4 id="1-&#x5D4C;&#x5957;&#x89C4;&#x8303;">1. &#x5D4C;&#x5957;&#x89C4;&#x8303;</h4>
<ol>
<li><p>&#x5728; HTML5 &#x4E2D;, &#x4E0D;&#x4E00;&#x5B9A;&#x8981;&#x5173;&#x95ED;&#x6240;&#x6709;&#x5143;&#x7D20; (&#x4F8B;&#x5982; <code>&lt;p&gt;</code> &#x5143;&#x7D20;)&#xFF0C;&#x4F46;&#x5EFA;&#x8BAE;&#x6BCF;&#x4E2A;&#x5143;&#x7D20;&#x90FD;&#x8981;&#x6DFB;&#x52A0;&#x5173;&#x95ED;&#x6807;&#x7B7E;.</p>
</li>
<li><p>&#x5145;&#x5206;&#x5229;&#x7528;&#x65E0;&#x517C;&#x5BB9;&#x6027;&#x95EE;&#x9898;&#x7684;html&#x81EA;&#x8EAB;&#x6807;&#x7B7E;, &#x6BD4;&#x5982;span, em, strong, optgroup, label,&#x7B49;&#x7B49;.</p>
</li>
<li><p>&#x5C3D;&#x53EF;&#x80FD;&#x51CF;&#x5C11;div&#x5D4C;&#x5957;, &#x5982;</p>
</li>
</ol>
<pre><code>
&lt;div class=&quot;box&quot;&gt;

 &lt;div class=&quot;welcome&quot;&gt;&#x6B22;&#x8FCE;&#x8BBF;&#x95EE;XXX, &#x60A8;&#x7684;&#x7528;&#x6237;&#x540D;&#x662F;&lt;div class=&quot;name&quot;&gt;&#x7528;&#x6237;&#x540D;&lt;/div&gt;

 &lt;/div&gt;

&lt;/div&gt;
</code></pre><p>&#x5B8C;&#x5168;&#x53EF;&#x4EE5;&#x7528;&#x4EE5;&#x4E0B;&#x4EE3;&#x7801;&#x66FF;&#x4EE3;:</p>
<pre><code>
&lt;div class=&quot;box&quot;&gt;

 &lt;p&gt;&#x6B22;&#x8FCE;&#x8BBF;&#x95EE;XXX, &#x60A8;&#x7684;&#x7528;&#x6237;&#x540D;&#x662F;&lt;span&gt;&#x7528;&#x6237;&#x540D;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;
</code></pre><h4 id="2-&#x6807;&#x7B7E;&#x5C5E;&#x6027;">2. &#x6807;&#x7B7E;&#x5C5E;&#x6027;</h4>
<ol>
<li><p>&#x5C5E;&#x6027;&#x548C;&#x503C;&#x5168;&#x90E8;&#x5C0F;&#x5199;&#xFF0C;&#x6BCF;&#x4E2A;&#x5C5E;&#x6027;&#x90FD;&#x5FC5;&#x987B;&#x6709;&#x4E00;&#x4E2A;&#x503C;&#xFF0C;&#x6BCF;&#x4E2A;&#x503C;&#x5FC5;&#x987B;&#x52A0;&#x53CC;&#x5F15;&#x53F7;&#x3002;</p>
</li>
<li><p>&#x6CA1;&#x6709;&#x503C;&#x7684;&#x5C5E;&#x6027;&#x5FC5;&#x987B;&#x4F7F;&#x7528;&#x81EA;&#x5DF1;&#x7684;&#x540D;&#x79F0;&#x505A;&#x4E3A;&#x503C;&#xFF08;checked&#x3001;disabled&#x3001;readonly&#x3001;selected&#x7B49;&#x7B49;&#xFF09;&#x3002;</p>
</li>
<li><p>&#x5F15;&#x5165;&#x6837;&#x5F0F;&#x6587;&#x4EF6;&#x6216;JavaScript&#x6587;&#x4EF6;&#x65F6;, &#x987B;&#x7565;&#x53BB;&#x9ED8;&#x8BA4;&#x7C7B;&#x578B;&#x58F0;&#x660E;(type&#x5C5E;&#x6027;), &#x5199;&#x6CD5;&#x5982;&#x4E0B;:</p>
<ul>
<li><p><code>&lt;link rel=&quot;stylesheet&quot; href=&quot;...&quot; /&gt;</code></p>
</li>
<li><p><code>&lt;style&gt;...&lt;/style&gt;</code></p>
</li>
<li><p><code>&lt;script src=&quot;...&quot;&gt;&lt;/script&gt;</code></p>
</li>
</ul>
</li>
<li><p>&#x91CD;&#x8981;&#x56FE;&#x7247;&#x5FC5;&#x987B;&#x52A0;&#x4E0A;alt&#x5C5E;&#x6027;; &#x7ED9;&#x91CD;&#x8981;&#x7684;&#x5143;&#x7D20;&#x548C;&#x622A;&#x65AD;&#x7684;&#x5143;&#x7D20;&#x52A0;&#x4E0A;title.</p>
</li>
<li><p>&#x5728;&#x9875;&#x9762;&#x4E2D;&#x5C3D;&#x91CF;&#x907F;&#x514D;&#x4F7F;&#x7528;style&#x5C5E;&#x6027;,&#x5373;style=&quot;&#x2026;&quot;.</p>
</li>
<li><p>&#x4E66;&#x5199;&#x94FE;&#x63A5;&#x5730;&#x5740;&#x65F6;, &#x5FC5;&#x987B;&#x907F;&#x514D;&#x91CD;&#x5B9A;&#x5411;&#xFF0C;&#x4F8B;&#x5982;&#xFF1A;<code>href=&quot;http://itaolun.com/&quot;</code>, &#x5373;&#x987B;&#x5728;URL&#x5730;&#x5740;&#x540E;&#x9762;&#x52A0;&#x4E0A;&#x201C;/&#x201D;.</p>
</li>
<li><p>&#x80FD;&#x4EE5;&#x80CC;&#x666F;&#x5F62;&#x5F0F;&#x5448;&#x73B0;&#x7684;&#x56FE;&#x7247;, &#x5C3D;&#x91CF;&#x5199;&#x5165;css&#x6837;&#x5F0F;&#x4E2D;.</p>
</li>
</ol>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="1.html整体结构.html" class="navigation navigation-prev " aria-label="Previous page: HTML整体结构">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="3.html内容语义.html" class="navigation navigation-next " aria-label="Next page: HTML内容语义">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"HTML代码格式","level":"1.2.2","depth":2,"next":{"title":"HTML内容语义","level":"1.2.3","depth":2,"path":"html/3.html内容语义.md","ref":"html/3.html内容语义.md","articles":[]},"previous":{"title":"HTML整体结构","level":"1.2.1","depth":2,"path":"html/1.html整体结构.md","ref":"html/1.html整体结构.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":[],"pluginsConfig":{"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"html/2.html代码格式.md","mtime":"2019-10-12T05:14:42.932Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2020-07-02T00:51:07.028Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

